<template>
    <div class="main login_box">
        <div class="login_dl">
            <div class="login_head">
                <img src="./../assets/logo.png" alt="">
            </div>
            <el-form :model="login_form" status-icon :rules="rules" ref="login_form" class="login_form">
                <el-form-item prop="username">
                    <el-input type="text" prefix-icon="el-icon-s-custom" v-model="login_form.username" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item prop="password">
                    <el-input type="password" prefix-icon="el-icon-lock" v-model="login_form.password" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item class="btns">
                    <el-button type="success" >登录</el-button>
                    <el-button type="danger" >重置</el-button>
                </el-form-item>
            </el-form>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            login_form: {
                username: 'admin',
                password: '123456'
            },
            rules: {
                username: [
                    { required: true, message: '用户名不能为空', trigger: 'blur' },
                    { min: 3, max: 10, message: '请输入3-10个字符', trigger: 'blur' },
                ],
                password: [
                    { required: true, message: '密码不能为空', trigger: 'blur' },
                    { min: 6, max: 16, message: '请输入6-16个字符', trigger: 'blur' },
                ],
            }
        };
    },
    methods: {
        
    }
}
</script>

<style scoped lang="less">
.login_box{
    width: 100%;
    height: 100vh;
    background-color: #2b4b6b;
    display: flex;
    justify-content: center;
    align-items: center;
    .login_dl{
        width: 450px;
        height: 300px;
        border-radius: 10px;
        background-color: #fff;
        position: relative;
        .login_head{
            width: 130px;
            height: 130px;
            position: absolute;
            left: 50%;
            transform: translate(-50%,-50%);
            border-radius: 50%;
            overflow: hidden;
            background-color: #fff;
            border: 10px solid #eee;
            box-shadow: 0 0 10px #ffffff;
            img{
                width: 100%;
                height: 100%;
            }
        }
        .login_form{
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 0 10px;
        }
    }
    .btns{
        display: flex;
        justify-content: flex-end;
    }
}
</style>